package com.andrew.dao;

import java.sql.SQLException;
import java.util.List;

import com.andrew.entity.Cart;
import com.andrew.entity.CartDetail;
import com.andrew.entity.Customer;


public interface CartDao {
	
	public int addCartDetailInfo(int bookId,int quantity,Cart cart)throws SQLException ;
	
	public Cart queryCart(int customerId) throws SQLException;
	
	public CartDetail queryCartDetailByBookIdAndCartId(int bookId,Cart cart)throws SQLException;
	
	public int udateQuantity(int service,int bookId,Cart cart)throws SQLException;
	
	public int  getTotalCountOfCart(Cart cart)throws SQLException;
	
	public List<CartDetail> queryCartDetail(Cart cart)throws SQLException;
	
	public void deleteByCustomerId(Customer customer) throws SQLException;
	
	public long countCartDetailsByCart(Cart cart) throws SQLException;
	
	
	public int deleteOneCartDetail(int bookId,Cart cart) throws SQLException;
	
	public String queryCartDetailQuantity(int bookId,Cart cart)throws SQLException;
	
}
